<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
request.setAttribute("basePath", basePath);
%>

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>解放军第三〇五医院</title>
    <link rel="stylesheet" href="${basePath}/static/publics/assets/swiper/css/swiper.min.css"/>
    <link href="${basePath}/static/css/Common/basic.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="${basePath}/static/css/Pigeonhole/Add_patient.css" rel="stylesheet" type="text/css"/>
	<style type="text/css">
		.redColor{
		    color:red;
		}
	</style>
</head>
<body>
<div class="files_container">
	<input type="hidden" id="basePath" value="${basePath }"/>
    <div class="files_title">
        <h3>添加患者信息</h3>
        <ul>
            <li><a id="closeBtn" onclick="custom_close()">关闭</a></li>
        </ul>
    </div>
    <div class="files_content clearfix">
        <div class="files_right left">
            <div class="files_header">
                <div class="left">文件对照信息</div><div class="right">当前页码 <span id="swipePage">1</span>/<span id="totalPage">${count}</span></div>
            </div>
            <div class="files_page">
                <div class="swiper-container swiper-container-horizontal">
                    <div class="swiper-wrapper">
                    <input type="hidden" value="${uploadScanId}" id="uploadScanId"/>
                    <c:forEach items="${urlList}" var="url"  varStatus="xh">
                	<c:choose>
                	<c:when test="${url.fileType=='pdf'}">
                     <div class="swiper-slide" data-index="${xh.index+1}">
                        <iframe width="100%" height="100%" src="${hospitalizationNoteResourceUrl }${url.fileUrl}${url.fileName}"></iframe>
                   	 </div>
                    </c:when>
                    <c:otherwise>
	                    <div class="swiper-slide" data-index="${xh.index+1}">
	                        <img width="100%" height="100%"  src="${hospitalizationNoteResourceUrl }${url.fileUrl}${url.fileName}" alt="">
	                    </div>
                    </c:otherwise>
               		</c:choose>
                    </c:forEach>
                    </div>
                    <div class="swiper-button-next"></div>
                    <div class="swiper-button-prev"></div>
                </div>
            </div>
        </div>
        <input type="hidden" name="citizenGuid" id="citizenGuid" value="">
        <div class="list_con_table right">
            <div class="search_table">
              <form action="${basePath}/bind/addPatient" id="addPatientForm" method="post">
              <input type="hidden" name="uploadScanId" id="uploadScanId" value="${uploadScanId}"/>
                <ul>
                	

                    <li class="Label_1"  style="color: red;">姓名：&nbsp;</li>
                    <li class="Label_2">
                    <input class="input_box" type="text"  name='name' id='name' value='' title="" /></li>
                     <li class="Label_1" >证件类型</li>
                    <li class="Label_2">
                    <select name="idType"  class="input_box" >
                            <option value="1">身份证</option>
                            <option value="2">军官证</option>
                        </select>
                    
                    </li>
                    <li class="Label_1"  style="color: red;">身份证：&nbsp;</li>
                    <li class="Label_2"><input class="input_box" type="text"  name='idNumber' id='idNumber' value='' title="" /></li>
                    <li class="Label_1">性别：&nbsp;</li>
                    <li class="Label_2">
                        <select name="sexId" class="input_box">
                        <%-- <c:forEach items="${sexMsgList}" var="sexMsg">
                            <option value="${sexMsg.id}">${sexMsg.name}</option>
                        </c:forEach> --%>
                        	<c:if test="${not empty basicInfos.sexes }">
                        		
                        		<c:forEach items="${basicInfos.sexes}" var="sexMsg">
		                            <option value="${sexMsg.id}">${sexMsg.name}</option>
		                        </c:forEach>
                        	</c:if>
                        	<%--  --%>
                        </select>
                    </li>
                    
                    <li class="Label_1"  style="color: red;">联系方式：&nbsp;</li>
                    <li class="Label_2"><input class="input_box" id="mobilePhone" name="mobilePhone" type="text" title="" /></li>
                    <li class="Label_1">出生日期：&nbsp;</li>
                    <li class="Label_2"><input class="input_box" name="birthday" type="text"  onFocus="WdatePicker()"/></li>

                    <li class="Label_1">家庭住址 :&nbsp;</li>
                    <li class="Label_2"><input type="text" id="addressNo" name="addressNo" class="input_box"/></li>
                    <li class="Label_1" style="color: red;">住院号：&nbsp;</li>
                    <li class="Label_2"><input class="input_box"  type="text"   name='mrId' id='mrId' value='' title="" /></li>

                    <li class="Label_1" style="color: red;">病案号：&nbsp;</li>
                    <li class="Label_2"><input class="input_box"  type="text"   name='onlyId' id='onlyId' value='' title="" /></li>

  <%--                   <li class="Label_1">婚姻状况：&nbsp;</li>
                    <li class="Label_2">
                        <select name="" disabled="disabled" class="input_box">
                         <c:forEach items="${marriageMsgList}" var="marriage"  varStatus="xh">
                            <option value="${marriage.no}">${marriage.name}</option>
                       	</c:forEach>
                        </select>
                    </li> --%>
                   
         
                  
         <!--            <li class="Label_1">医保类型</li>
                    <li class="Label_2">
                        <select disabled="disabled" name="treatmentTypeId" class="input_box">
                            <option value="1">商业保险</option>
                            <option value="2">企业险</option>
                            <option value="3">农村合作医疗</option>
                        </select>
                    </li> -->
                    <li class="Label_1" >就诊保密标识</li>
                    <li class="Label_2">
                        <select name="treatmentSignId"  class="input_box">
                            
                         <c:forEach items="${treatmentSignList}" var="treatSign">
                             <option  value="${treatSign.id}">${treatSign.name}</option>
                        </c:forEach>
                        </select>
                        
                    </li>
                    <li class="Label_1" >医院机构</li>
                    <li class="Label_2">
                   		<select name="hospitalId" class="input_box" id="hospitalId" onchange="getInOutHospital()">
                   		  <c:forEach items="${hospitalMsgList}" var="hospital">
                            <option value="${hospital.id}">${hospital.name}</option>
                          </c:forEach>
                        </select>
                    </li>
                    <li class="Label_1">就诊类型</li>
                    <li class="Label_2">
                        <select name="treatmentTypeId" class="input_box">
                          <c:forEach items="${treatmentTypeList}" var="treatType">
                              <option  value="${treatType.id}" >${treatType.name}</option>
                        </c:forEach>
                        </select>
                    </li>
                  <!--   <li class="Label_1">入院状况</li>
                    <li class="Label_2">
                        <select name="" disabled="disabled" class="input_box">
                            <option value="">--请选择--</option>
                            <option value="1">1-</option>
                            <option value="2">2-其他</option>
                        </select>
                    </li> -->
                    <li class="Label_1">入院日期</li>
                    <li class="Label_2"><input type="text" name="inHospitalDate" id="inHospitalDate" class="input_box"  onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></li>
                    <li class="Label_1">入院科室</li>
                    <li class="Label_2">
                        <select name="inDeptId" class="input_box" id="inDeptId">
                        </select>
                    </li>
                    <li class="Label_1">入院方式</li>
                    <li class="Label_2">
                        <select name="inHospitalTypeId" class="input_box" id="inHospitalTypeId">
                        </select>
                    </li>

                    <li class="Label_1"  style="color: red;">出院日期</li>
                    <li class="Label_2"><input type="text" name="outHospitalDate" id="outHospitalDate" class="input_box" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" title=""/></li>

                    <li class="Label_1">出院科室</li>
                    <li class="Label_2">
                        <select name="outDeptId" class="input_box" id="outDeptId">
                        </select>
                    </li>
          
                    <!-- <li class="Label_1">主治医生</li>
                    <li class="Label_2"><input type="text" disabled="disabled" class="input_box"/></li> -->
                    <li class="Label_1">离院方式</li>
                	<li class="Label_2">
                        <select name="outHospitalTypeId" class="input_box" id="outHospitalTypeId">
                        	<c:if test="${not empty basicInfos.outHospitalList }">
                        		
                        		<c:forEach items="${basicInfos.outHospitalList}" var="outHospitalType">
		                            <option value="${outHospitalType.id}">${outHospitalType.name}</option>
		                        </c:forEach>
                        	</c:if>
                        </select>
                    </li>
                    <li class="Label_5">
                        <a class="btn" onclick="addPatient()">保存</a>
                    </li>
                </ul>
                </form>
            </div>
        </div>
    </div>
</div>
<!--JS部分-->
<script type="text/javascript" src="${basePath}/static/publics/assets/jquery/jquery.min.js"></script>
<script type="text/javascript" src="${basePath}/static/publics/assets/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${basePath}/static/publics/assets/swiper/js/swiper.min.js"></script>
<script type="text/javascript" src="${basePath}/static/js/swiper.js"></script>
<script type="text/javascript" src="${basePath}/static/js/util.js"></script>
<script type="text/javascript" src="${basePath}/static/js/medbind.js"></script>
</body>
</html>